<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<?php $this->pageTitle="系统邮件服务器设置"; ?>
<?php $form=$this->beginWidget('CActiveForm', array(
)); ?>
<div class="icon32" id="icon-tools"><br>
</div>
<?php $arr = Yii::app()->params['helpDocument'];?>
<h2>邮件服务器设置<a target="<?php echo $arr['target']?>" href="<?php echo $arr['emailServer']?>"><?php echo $arr['img']?></a><span class="description">(用户自主注册、用户密码找回都需要邮件服务器的支持)</span></h2>
<?php echo $form->errorSummary($model); ?>
<?php
$message = Yii::app()->request->getParam("message");
if(strlen($model->message)>0){
	$message = $model->message;
}
if(strlen($message)>0){
	?>
<div id="message" class="updated below-h2">
<p><?php echo $message;?></p>
</div>
	<?php }?>
	<?php echo $form->hiddenField($model,"action");?>
<table class="form-table">
	<tr>
		<th><?php echo $form->labelEx($model,'enabledEmail'); ?></th>

		<td><?php echo $form->radioButtonList($model,'enabledEmail',
		array('1'=>'开启','0'=>'关闭'),array('separator'=>'',"class"=>"emailradio"));?></td>
	</tr>
</table>
<div id="emailSettingDiv" style="display: none">
<table class="form-table">
	<tr>
		<th scope="row"><?php echo $form->labelEx($model,'enabledMailFun'); ?></th>
		<td><?php echo $form->radioButtonList($model,'enabledMailFun',
		array('1'=>'Mail函数发送','0'=>'SMTP方式'),array('separator'=>'',"class"=>"mainradio"));?></td>
	</tr>
</table>
<div id="mainEnabled" style="display: none">
<table class="form-table">
	<tr>
		<td>
		<div
			style="background: #fff; color: #333; font-family: sans-serif; margin: 2em auto; width: 800px; padding: 1em 2em; -moz-border-radius: 11px; -khtml-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; border: 1px solid #dfdfdf;">
		<table class="form-table">
			<tr>
				<th scope="row"><?php echo $form->labelEx($model,'smtpServer'); ?></th>
				<td><?php echo $form->textField($model,"smtpServer");?></td>

			</tr>
			<tr>
				<th scope="row"><?php echo $form->labelEx($model,'port'); ?></th>
				<td><?php echo $form->textField($model,"port");?></td>

			</tr>
			<tr>
				<th scope="row"><?php echo $form->labelEx($model,'sender'); ?></th>
				<td><?php echo $form->textField($model,"sender",array("size"=>"40"));?></td>

			</tr>
			<tr>
				<th scope="row"><?php echo $form->labelEx($model,'checkAuth'); ?></th>
				<td><?php echo $form->radioButtonList($model,'checkAuth',
				array('1'=>'需要验证','0'=>'无需验证'),array('separator'=>'',"class"=>"authradio"));?></td>
			</tr>
		</table>
		<div>
		<table id="checkAuthEnabled" style="display: none">
			<tr>
				<th scope="row"><?php echo $form->labelEx($model,'name'); ?></th>
				<td><?php echo $form->textField($model,"name",array("size"=>"40"));?></td>
			</tr>
			<tr>
				<th scope="row"><?php echo $form->labelEx($model,'passwd'); ?></th>
				<td><?php echo $form->passwordField($model,"passwd");?></td>
			</tr>
		</table>
		</div>
		</div>
		</td>
	</tr>
</table>
</div>
</div>
<div id="emailTestDiv">
<h3>邮件服务器测试</h3>
<table class="form-table">
	<tr>
		<th scope="row"><label for="dbhost"><?php echo $form->labelEx($model,'receiver'); ?></label></th>
		<td><?php echo $form->textField($model,"receiver",array("size"=>"40"));?></td>
	</tr>
</table>
<p class="step">
	<?php echo CHtml::submitButton('测试并保存',array("class"=>"Miniyun_btn01_btn7","onmouseover"=>"this.className='Miniyun_btn01_btn7hover'","onmouseout"=>"this.className='Miniyun_btn01_btn7'","name"=>"testSetting")); ?>
</p>
</div>
				<?php $this->endWidget();?>
<script
	type='text/javascript'
	src='<?php echo Yii::app()->request->baseUrl; ?>/statics/javascript/emailSetting.js'></script>
